const process = require("process");
console.log("当前进程的ID：" + process.pid);
console.log("当前进程的工作目录：" + process.cwd());
console.log("当前进程的命令行参数：" + process.argv);
console.log("当前进程的环境变量：" + process.env.mode);
// js 设置环境变量
process.env.mode = "development";
console.log("设置环境变量后，当前进程的环境变量：" + process.env.mode);
let i = 0;
setInterval(() => {
  console.log(`第${i}次执行`);
  i++;
  if (i === 5) {
    console.log("退出当前进程");
    process.exit();
  }
}, 1000);
